package web.admin.components;

import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

abstract public class CheckBoxPanel extends Panel {
    public abstract boolean isChecked(IModel model);

    public CheckBoxPanel(String id, final IModel model) {
        super(id, model);
        final CheckBox checkBox = new CheckBox("checkBox", new Model<Boolean>(CheckBoxPanel.this.isChecked(model)));
        add(checkBox);
        checkBox.setEnabled(false);
    }
}
